# Maintainer:
pkgname=py3-objgraph
pkgver=3.6.2
pkgrel=0
pkgdesc="Visually explore Python object graphs"
url="https://github.com/mgedmin/objgraph"
arch="noarch"
license="MIT"
makedepends="py3-gpep517 py3-setuptools py3-wheel"
subpackages="$pkgname-pyc"
source="$pkgname-$pkgver.tar.gz::https://github.com/mgedmin/objgraph/archive/refs/tags/$pkgver.tar.gz"
builddir="$srcdir/objgraph-$pkgver"

build() {
	gpep517 build-wheel \
		--wheel-dir .dist \
		--output-fd 3 3>&1 >&2
}

check() {
	python3 -m venv --clear --without-pip --system-site-packages .testenv
	.testenv/bin/python3 -m installer .dist/*.whl
	.testenv/bin/python3 -m unittest discover
}

package() {
	python3 -m installer -d "$pkgdir" \
		.dist/*.whl
}

sha512sums="
66363ab2d2bb3dc5a34b3307153cd683a7d363265624177965465713c2ddbda54e36a26ffa9422237206ac4d6cf61a0d38215b9bec247a2edd7d73f05c2139e3  py3-objgraph-3.6.2.tar.gz
"
